// 拼接车险状态查询参数
import stateStore from '@/components/ivew_conf/state_store'
const carStateStore = new stateStore()

export default (ctx, next) =>{
    let status = ctx.params.status;
    let statusCH:string[] = [];
    
    // 拼接查询字符
    if(Array.isArray(status) && status.length) {

        // 转换对应状态字符
        status.forEach((key, index) =>{
            statusCH.push(carStateStore.getVal(key).label)
        })

        // 拼接多类型查询
        ctx.params.status = statusCH.join(',');
    }

    next()
}